<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
   <% String path=request.getContextPath(); 
   String basePath=request.getScheme()
    + "://" + request.getServerName() + ":" + request.getServerPort() + path
    + "/"; 

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="<%=basePath%>">
<title>组合方案配置</title>
<link rel="stylesheet" href="<%=path%>/css/zTreeStyle/zTreeStyle.css">
<jsp:include page="/WEB-INF/jsp/common/common.jsp"></jsp:include>
<script type="text/javascript" src="<%=path%>/js/json2.js"></script>
<style type="text/css">
		#detail
        {
            position:relative;
            width: 200px;
            font-size: 12px;
            background: #fff;
            border: 1px solid #000;
            z-index: 2;
            display: none;
        } 
        #detail2
        {
            position:relative;
            width: 200px;
            font-size: 12px;
            background: #fff;
            border: 1px solid #000;
            z-index: 2;
            display: none;
        } 
</style>
<script type="text/javascript" src="<%=path%>/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.ztree.excheck-3.5.js"></script>
<script src="<%=path%>/js/jquery.divbox.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
	isReadyIframe();
	queryInsureGroup(1);
});

function isReadyIframe(){
	var iframe = $(window.parent.document).find("#iframe").length;
	if(iframe==0){
		window.location.href="<%=path%>/index.jsp";
	}
}

//关闭  窗口
function closeCurrentDIV(obj){
	if(obj == 'tradPartnerDiv' || obj == 'insuPlanMgtDiv'){
		$("#"+obj).CloseDiv2();
	}else{
		$("#"+obj).CloseDiv();	
	}
}

//点击“确定”按钮，选择合作伙伴
function choosePartner(){
	var selectedPartner = $("input[name='partnerradio']:checked");
	if(selectedPartner.length==0){
		$.message("error", "请选择一个合作伙伴");
		return;
	}
	var pno = selectedPartner.parent().parent().children(" td:eq(1)").html();
	var pname = selectedPartner.parent().parent().children(" td:eq(3)").html();
	$('#channel').val(pno);
	closeCurrentDIV('tradPartnerDiv');
}

/**
 * 页面初始化查询显示所有角色列表
 */
function queryInsureGroup(pageIndex){
	var groupname = $('#insureGroupName_input').val();
	$.openLoading();
	$.ajax({
		url : "<%=path%>/insureGroupConfig/loadInsureGroup",
		type : 'POST',
		async : true,
		data:{"current":pageIndex,"groupName":groupname},
		dataType:'json',
		success:function(insureGroupPage){
			$.closeLoading();
			if($.validate(insureGroupPage))return;
			//业务处理
				if(null != insureGroupPage){
					var buttonStr = "<a href='javascript:void(0)' onClick='editInsureGroup(this);return false'>编辑</a>&nbsp;<a href='javascript:void(0)' onClick='warnDelGroup(this)'>删除</a>&nbsp;<a href='javascript:void(0)' id='planmgtbtn' onClick='openInsuPlanDiv(this,1)'>方案管理</a>";
					var fieldNames = "groupId@TDH,groupName,<a href='javascript:void(this)' style='font-size:12px;display: block;overflow: hidden;white-space: nowrap;text-align:center;-o-text-overflow: ellipsis;text-overflow: ellipsis;width:240px;font-family:宋体;font-weight:normal' onDblClick='copyDetail(this);' onclick='showDatail(this);return false' onmouseover='showDatail(this);return false' onmouseout='closeDatail(this);return false'>groupDesc</a>,facadeAppTypeName,partnerCode,groupStatus,facadeAppType@TDH";
					var tableContent = creatTable(fieldNames,insureGroupPage,buttonStr);
					var tableObj = $("#insureGroupTable");
					tableObj.find("tbody").remove();
					tableObj.append(tableContent);

					var strPage = creatChannelPage(pageIndex,6,insureGroupPage.maxPage,"22");

					var pageDIV = $("#insureGroupPageDIV");
					pageDIV[0].innerHTML="";
					pageDIV.append(strPage);
				}
		}
	});
}


//打开新增”方案组合“弹出层”
function openAddInsureGroupDIV(){
	resetVal();
	$('#editInsureGroupDiv').OpenDiv();
	//保存按钮调用“添加方案组”函数
	$("#saveBtn").attr("onclick","").unbind("click").click(function(){  
		addGroup();  
		});

}


//打开合作伙伴窗口
function openChannelDiv(divObj,pageIndex,cur){
	$("#"+cur.id).blur();
	queryTradPartners(pageIndex);
}

//查询 合作伙伴
function queryTradPartners(pageIndex){
	mergePartnerParams(pageIndex);
}
//拼接页面查询参数  查询投保单位
function mergePartnerParams(pageIndex){
	var size = 8;
	var channelCode = $('#channelCode').val();
	var channelName = $('#channelName').val();
	queryPartner({pageIndex:pageIndex,size:size,channelCode:channelCode,channelName:channelName});
}

//加载合作伙伴
function queryPartner(param){
	$("#BigDiv2").remove();
	$.openLoading();
	$.ajax({
		url : "insure/loadChannelInfo",
		type : 'POST',
		async : true,
		data:param,
		dataType:'json',
		success:function(partnerPage){
			$.closeLoading();
			if($.validate(partnerPage))return;
					var radioObj ="<input class='input_fxk' name='partnerradio' type='radio' value=''>";
					var fieldNames = "channelCode@TDH,channelCode,channelName";
					var tableContent = creatTable1(fieldNames,partnerPage,radioObj);
					var tableObj = $("#TradPartnerTable");
					tableObj.find("tbody").remove();
					tableObj.append(tableContent);
					
					var strPage = creatChannelPage3(param.pageIndex,6,partnerPage.maxPage,"16");
					var pageDIV = $("#TradPartnerPageDIV");
					pageDIV[0].innerHTML="";
					pageDIV.append(strPage);
					
					$('#tradPartnerDiv').OpenDiv2();
					
					bindradio();
			}
	});
}  

//绑定单选按钮事件，选中某个单选按钮，该按钮所在行高亮显示
function bindradio(){
	$("input[name='partnerradio']").click(function(){
		$("input[name='partnerradio']").parent().parent().removeClass("table_highlighter");
		$(this).parent().parent().addClass("table_highlighter");
   	});
}


//新增”方案组“
function addGroup(){
	var channel = $.trim($('#channel').val());
	var status = $.trim($('#status').val());
	var appType = $.trim($('#fapptype').val());
	var name = $.trim($('#groupName').val());
	var desc = $.trim($('#desc').val());
	if(name.length==0){
		$.message("error","组合方案名不能为空");
		return;
	}
	if(desc.length==0){
		$.message("error","方案描述不能为空");
		return;
	}

	$.openLoading();
	$.ajax({
		url : "insureGroupConfig/addInsureGroup",
		type : 'POST',
		async : true,
		data:{groupName:name,groupDesc:desc,facadeAppType:appType,partnerCode:channel,groupStatus:status},
		dataType:'json',
		success:function(data){
			$.closeLoading();
			closeCurrentDIV('editInsureGroupDiv');
			resetVal();
			if($.validate(data))return;
			queryInsureGroup(1);
		}
	});
}


//打开编辑窗口，编辑“组合方案信息”
var id = -1;
function editInsureGroup(obj){
	var editTr = $(obj).parent('td').parent('tr')[0];
	id = editTr.childNodes[0].innerHTML;
	var name = editTr.childNodes[1].innerHTML;
	var desc = editTr.childNodes[2].childNodes[0].innerHTML;
	var channel = editTr.childNodes[4].innerHTML;
	var statusTxt = editTr.childNodes[5].innerHTML;
	var type = editTr.childNodes[6].innerHTML;

	$('#channel').val(channel);
	$('#groupName').val(name);
	$('#desc').val(desc);
	
	if(statusTxt=="有效"){
		$("#status option[value='1']").attr("selected",true);
	}else{
		$("#status option[value='2']").attr("selected",true);
	}
	
	$('#fapptype').val(type);
	
	//保存按钮调用“编辑方案组”函数
	$("#saveBtn").attr("onclick","").unbind("click").click(function(){  
		editGroup();  
		});

	$('#editInsureGroupDiv').OpenDiv();
}

//编辑方案组信息
function editGroup(){
	var channel = $.trim($('#channel').val());
	var status = $.trim($('#status').val());
	var appType = $.trim($('#fapptype').val());
	var name = $.trim($('#groupName').val());
	var desc = $.trim($('#desc').val());
	if(name.length==0){
		$.message("error","组合方案名不能为空");
		return;
	}
	if(desc.length==0){
		$.message("error","方案描述不能为空");
		return;
	}

	$.openLoading();
	$.ajax({
		url : "insureGroupConfig/editInsureGroup",
		type : 'POST',
		async : true,
		data:{groupId:id,groupName:name,groupDesc:desc,facadeAppType:appType,partnerCode:channel,groupStatus:status},
		dataType:'json',
		success:function(data){
			$.closeLoading();
			closeCurrentDIV('editInsureGroupDiv');
			resetVal();
			if($.validate(data))return;
			queryInsureGroup(1);
		}
	});
}

//删除之前 弹出提示框
function warnDelGroup(obj){
	$.dialog({
		type: "warn",
		content: "确定要删除该组合方案吗",
		onOk: function() {
			excuteDel(obj);
		}
	});
}

//删除方案组
function excuteDel(obj){
	$.openLoading();
	var delTr = $(obj).parent('td').parent('tr')[0];
	var id = delTr.childNodes[0].innerHTML;

	$.ajax({
		url: "insureGroupConfig/delInsureGroup",
		type: "post",
		dataType: "json",
		data:{groupId:id},
		async:true,
		cache:false,
		success: function(data) {
			$.closeLoading();
			if($.validate(data))return;
			queryInsureGroup(1);
		}
	});
}


//打开“方案管理”窗口 (传入：方案组ID 和  所属合作伙伴代码)
var id;
var pcode;
function openInsuPlanDiv(cur,pageIndex){
	$("#"+cur.id).blur();
	var mgtTr = $(cur).parent('td').parent('tr')[0];
	id = mgtTr.childNodes[0].innerHTML;
	pcode = mgtTr.childNodes[4].innerHTML;
	resetQueryCondition();
	queryInsuPlan(pageIndex);
}

//查询 投保方案
function queryInsuPlan(pageIndex){
	mergePlanParams(pageIndex);
}
//拼接页面查询参数  查询投保方案
function mergePlanParams(pageIndex){
	var size = 8;
	var code = $('#planCode').val();
	var name = $('#planName').val();
	queryInsuPlans({pageIndex:pageIndex,size:size,insuPlanNo:code,insuPlanName:name,groupId:id,partnerCode:pcode});
}

//查询投保方案
function queryInsuPlans(param){
	$("#BigDiv2").remove();
		$.openLoading();
		$.ajax({
			url : "insureGroupConfig/loadInsurePlans",
			type : 'POST',
			async : true,
			data:param,
			dataType:'json',
			success:function(planPage){
				$.closeLoading();
				if($.validate(planPage))return;
				var firstInput ="<input class='input_fxk' name='insureradio' type='checkbox'>";
				var lastInput ="<select style='width:60px;' name='isReqSel'><option value='1'>是</option><option value='0'>否</option></select>";
				var fieldNames = "insuPlanNo,insuPlanName,required@TDH,isChecked@TDH";
				var tableContent = creatTable2(fieldNames,planPage,firstInput,lastInput);
				var tableObj = $("#TradPlanTable");
				tableObj.find("tbody").remove();
				tableObj.append(tableContent);
				
				var strPage = creatChannelPage2(param.pageIndex,6,planPage.maxPage,"23");
				var pageDIV = $("#TradPlanPageDIV");
				pageDIV[0].innerHTML="";
				pageDIV.append(strPage);
				
				//是否必需选择
				checkRequired();

				$('#insuPlanMgtDiv').OpenDiv2();

				bindradio();
				}
		});
	}  

//是否必需选择、是否勾选
function checkRequired(){
	var arr = document.getElementsByName("insureradio");
	if(arr.length>0){
		for(var i=0;i<arr.length;i++){
			//是否必需：动态控制”是“ 或 ”否“
			var temp = $(arr[i]).parent('td').parent('tr')[0];
			var reqVal = temp.childNodes[3].innerHTML;

			var req = document.getElementsByName("isReqSel");
			$(req[i]).val(reqVal);
			
			//复选框选择：动态选中
			var checkedVal = temp.childNodes[4].innerHTML;
			
			if(checkedVal ==0){
				$(arr[i]).attr("checked",true);
			}else{
				$(arr[i]).attr("checked",false);
			}
			
		}
	$.ajax({
		url : "insureGroupConfig/loadInsuPlanGroups",
		type : 'POST',
		async : true,
		data:{planGroupId:id},
		dataType:'json',
		success:function(data){
			if($.validate(data))return;
			if(data.length>0){
				for(var i=0;i<data.length;i++){
					$('input [name="partnerradio"]')
				}
			}
		}	
	});
	}
}
	
//方案管理”确定“按钮功能，将打钩的数据包括（方案代码、名称、是否必需维护到方案与方案组关联表）
function setInsuPlanGroupRelation(){
	var arr = document.getElementsByName("insureradio");

	if(arr.length==0){
		$.message("error","当前没有数据可操作");
		return;
	}

	var jsonArr = new Array();//将选中的行数据封装成数组传入后台
	
	for(var i=0;i<arr.length;i++){
		var temp = $(arr[i]).parent('td').parent('tr')[0];

		//是否选中
		var checkBox = temp.childNodes[0].childNodes[0];
		var checkFlag = $(checkBox).attr('checked');
		if(checkFlag){
			isChecked=1;
		}else{
			isChecked=0;
		}
		
			//是否必需
//			var req = temp.childNodes[5].childNodes[0];
			var req = document.getElementsByName("isReqSel");
			var isReq = $(req[i]).val();
			

			
			//方案号
			var insuNo = temp.childNodes[1].innerHTML;
			//方案组ID
//			alert("第"+(i+1)+"行"+"\n"+"是否必需："+isReq+"------方案号："+insuNo+"------ID："+id);
			jsonArr.push({"isChecked":isChecked,"insuPlanNumber":insuNo,"planGroupId":id,"required":isReq});
	}
	$.openLoading();
	$.ajax({
		url : "insureGroupConfig/setInsuPlanGroupRelation",
		type : 'POST',
		async : true,
		data:JSON.stringify(jsonArr),
		dataType:'json',
		contentType: "application/json",
		success:function(data){
			$.closeLoading();
			if($.validate(data))return;
			closeCurrentDIV('insuPlanMgtDiv');
		}	
	});
}

//方案管理页面查询条件重置
function resetQueryCondition(){
	$('#planCode').val('');
	$('#planName').val('');
}


//新增/编辑方案组页面信息重置
function resetVal(){
	$('#channel').val('');
	$('#status').val(1);
	$('#fapptype').val(1);
	$('#groupName').val('');
	$('#desc').val('');
}

function showDatail(obj){
	var result=obj.innerHTML;
	if(result!=""){
		 var length =obj.scrollWidth;
		 if(length>240){
		 	var e = arguments.callee.caller.arguments[0]||window.event;
		 	var y = e.clientY;
		 	var x= document.body.offsetWidth;
		 	if(x>460){
		 		x=x-630;
		 	}
		 	var div3 = document.getElementById("detail");   
		 	document.getElementById("detail").style.display = 'block';
		 	div3.style.left=x;     
            div3.style.top=e.clientY+document.body.scrollTop;  
            div3.style.position="absolute";
		 	$("#input")[0].innerHTML=result;
		 }
	}
}
function copyDetail(obj){
	var result=obj.innerHTML;
	if(result!=""){
		 var length =obj.scrollWidth;
		 if(length>0){
		 	var e = arguments.callee.caller.arguments[0]||window.event;
		 	var y = e.clientY;
		 	var x= document.body.offsetWidth;
		 	if(x>460){
		 		x=x-630;
		 	}
		 	var div3 = document.getElementById("detail2");   
	 		document.getElementById("detail2").style.display = 'block';
		 	div3.style.left=x;     
            div3.style.top=e.clientY+document.body.scrollTop;  
            div3.style.position="absolute";
		 	$("#output")[0].innerHTML=result;
		 }
	}
}

function closeDatail(){
 document.getElementById("detail").style.display = 'none';
}
function closeDiv(){
 document.getElementById("detail2").style.display = 'none';
}
</script>
</head>

<body>
	<div class="current">
           <table class="current_table_1">
              <tbody><tr class="f2">
                <td><img src="./images/current_1.jpg"></td>
                  <td class="current_table_1_td">
                  <img src="images/current_1.png">&nbsp;您现在的位置：&nbsp;
                  <span style=" color:#136bab; ">产品管理
                  <span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>组合方案配置
                  </span>
                  </td>
                  <td><img src="./images/current_3.jpg"></td>
              </tr>
           </tbody></table>
      </div>

	<%--显示role的表格 --%>
	<table border="1" class="table_02" style="height:150px">
  		<tr height="50px">
  			<td colspan="2" align="center">
				组合方案名：&nbsp;<input id="insureGroupName_input" class="input_text"/>&nbsp;&nbsp;
				<input type="button" id="queryInsureGroupBtn" class="input_button_1" value="查询" onclick="queryInsureGroup(1)"/>
				<input type="button" id="addInsureGroupBtn" class="input_button_1"  value="新增" onclick="openAddInsureGroupDIV()"/>
			</td>
  		</tr>
  		<tr>
  			<td valign="top">
	  			<div id="roleDIV" style="width:98%;margin:5px">
			  		<table class="table_02" id="insureGroupTable">
			  		<thead>
		              <tr>
		                  <th style="width:20%">组合方案名</th>
		                  <th style="width:25%">描述</th>
		                  <th style="width:15%">投保方式</th>
		                  <th style="width:20%">所属合作伙伴</th>
		                  <th style="width:5%">状态</th>
		                  <th style="width:15%">操作</th>
		              </tr>
		              </thead>
		              <tbody>
					  </tbody>
		            </table>
						<div id="insureGroupPageDIV"  class="page" >
	  				 </div>
	  			</div>
  			</td>
  		</tr>
  	</table>
  	
  	
  	<!--   	新增/编辑组合方案 DIV 默认隐藏-->
  		<div id="editInsureGroupDiv" style="display:none;width:580px;height:300px;">
		<input type="hidden" id="row_num" name="row_num" value="0"/>
			<div class="table_title_div">
					<table class="table_title" style='width:100%;height: 20px;'>
						<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="<%=path %>/images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('editInsureGroupDiv')"/></td>
						</tr>
					</table>
			</div>
		<table class="table_02" id="saveInsureGroupTable" style="height:68%;width: 95%" align="center" >
			<tr>
				<td style="text-align:right;border-right:0px;" width="20%">组合方案名：</td>
				<td style="text-align:left;" width="80%" >&nbsp;&nbsp;<input type="text" id="groupName" class="input_text">
				<span class="red" id="nameRed">*</span>
				</td>
			</tr>
			<tr>
				<td style="text-align:right;border-right:0px;" width="20%">所属合作伙伴：</td>
				<td style="text-align:left;" width="80%" >&nbsp;&nbsp;<input type="text" id="channel" class="input_text"  readonly="readonly" style=" background-color: #ccc;">
				<input type="button" id="addubtn" class="input_button_1"  value="选择" onclick="openChannelDiv('tradPartnerDiv',1,this)"/>
				</td>
			</tr>
			<tr>
				<td style="text-align:right;border-right:0px;" width="20%">投保方式：</td>
				<td style="text-align:left;" width="80%" >
				    &nbsp;&nbsp;<select id="fapptype" style="width:130px;">
		                <c:forEach var="group" items="${facadeAppTypes}">
                  			<option value="${group.code}">${group.codeName}</option>
                  		</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<td style="text-align:right;border-right:0px;" width="20%">状态：</td>
				<td style="text-align:left;" width="80%" >
				    &nbsp;&nbsp;<select id="status" style="width:130px;">
						<option value="1">有效</option>
						<option value="2">无效</option>
					</select>
				</td>
			</tr>
			<tr>
				<td style="text-align:right;border-right:0px;" width="20%">方案描述：</td>
				<td style="text-align:left;" width="80%" >&nbsp;&nbsp;<textarea id="desc" cols="" rows="4" class="textarea_1" style="resize:none;" maxlength="50" ></textarea>
				<span class="red">*</span>
				</td>
			</tr>
		</table>
		<div style="height:30px;width: 95%" align="center"  >
			<input type="button" id="saveBtn" value="保存" onclick="addGroup()" class="input_button_1"/>&nbsp;&nbsp;&nbsp;
			<input type="button" value="取消" onclick="closeCurrentDIV('editInsureGroupDiv')" class="input_button_1"/>
		</div>
	</div>

	<!--   	选择 合作伙伴 div-->
  		<div id="tradPartnerDiv" style="display:none;width:90%;text-align: center;">
		<input type="hidden" id="row_num" name="row_num" value="0"/>
			<div class="table_title_div">
					<table class="table_title" style='width:100%;height: 20px;'>
						<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="./images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('tradPartnerDiv')"/></td>
						</tr>
					</table>
			</div>
		<table class="table_02" id="table" style="width:98%">
			<tr>
				<td>
					<table class="search_table">
						<tr height="30px">
							<td colspan="3" style="text-align:center">合作伙伴代码：<input name="txt3"  id="channelCode"  type="text" class="input_text" value="" >
								&nbsp;&nbsp;合作伙伴名称：<input name="txt3" id="channelName"  type="text" class="input_text" value="">
								&nbsp;&nbsp;<input type="button"  class="input_button_1" id="searchBtn" value="查询" onClick="queryTradPartners(1)"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table id="TradPartnerTable"  class="content_table_1">
						<thead>
							<tr class="f1">
			                  <th style="width:5%">选择</th>
			                  <th style="width:10%">合作伙伴代码</th>
			                  <th style="width:20%">合作伙伴名称</th>
			              	</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
					<div id="TradPartnerPageDIV"  class="page"></div>
				</td>
			</tr>
		</table>
		<div align="center">
		   <input type="button"  value="确定" onclick="choosePartner()" class="input_button_3"/>&nbsp;&nbsp;&nbsp;
		   <input type="button" value="取消" onclick="closeCurrentDIV('tradPartnerDiv')" class="input_button_3"/>
		</div>
	</div>	
	
	
	<!--   	方案管理 div-->
  		<div id="insuPlanMgtDiv" style="display:none;width:90%;text-align: center;">
		<input type="hidden" id="row_num" name="row_num" value="0"/>
			<div class="table_title_div">
					<table class="table_title" style='width:100%;height: 20px;'>
						<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="./images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('insuPlanMgtDiv')"/></td>
						</tr>
					</table>
			</div>
		<table class="table_02" id="table" style="width:98%">
			<tr>
				<td>
					<table class="search_table">
						<tr height="30px">
							<td colspan="3" style="text-align:center">投保方案代码：<input name="txt3"  id="planCode"  type="text" class="input_text" value="" >
								&nbsp;&nbsp;投保方案名称：<input name="txt3" id="planName"  type="text" class="input_text" value="">
								&nbsp;&nbsp;<input type="button"  class="input_button_1" id="searchBtn" value="查询" onClick="queryInsuPlan(1)"/>
								<input type="button"  class="input_button_1" id="searchBtn" value="重置" onClick="resetQueryCondition()"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table id="TradPlanTable"  class="content_table_1">
						<thead>
							<tr class="f1">
			                  <th style="width:9%">选择</th>
			                  <th style="width:38%">投保方案代码</th>
			                  <th style="width:38%">投保方案名称</th>
			                  <th style="width:15%">是否必需</th>
			              	</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
					<div id="TradPlanPageDIV"  class="page"></div>
				</td>
			</tr>
		</table>
		<div align="center">
		   <input type="button" id="planbtn" value="确定" onclick="setInsuPlanGroupRelation()" class="input_button_3"/>&nbsp;&nbsp;&nbsp;
		   <input type="button" value="取消" onclick="closeCurrentDIV('insuPlanMgtDiv')" class="input_button_3"/>
		</div>
	</div>	
	
<div id="detail" style="display:none;">
			<div id="input" style="margin:5px;word-wrap:break-word;"></div>
		</div>
		<div id="detail2" style="display:none;">
			<h4  style='background-color:#A4BDE3;'>
				<table height="20px">
					<tr>
					    <td width="200px";>
					    </td>
					    <td align="right">
					       <img src="./images/closedown.gif"  onclick="closeDiv()"/>
					    </td>
					</tr>							
				</table>
				<input type="hidden" id="appId" value="">
			</h4>	
			<div id="output" style="margin:5px;word-wrap:break-word;"></div>
		</div>
 
</body>
</html>
